﻿
@{
    ViewBag.Title = "Tìm kiếm tài liệu";
    Layout = "~/Views/Shared/_Layout.MyAccount.cshtml";
}

<h2 class="app">
	<strong>vinaglue.com - Tìm kiếm tài liệu</strong>
</h2>
<div class="title nomargin">
    <h3>Kết quả tìm kiếm</h3>
</div>
<span class="paging">
    <span class="pageleft">                
        <span class="total" data-bind='text: PageText'></span>
        <span class="show ">Hiển thị <input type="text" class="text" id="pagesize" data-bind='value: PageSize, attr: {maxlength: 3}, event: { keypress: RunSomethingKey }' /> trên trang <span class="smallText" data-bind="text: PageSizeText"></span> </span>
    </span>
    <span class="pages">
        <span class="smallText" data-bind="text: PageCurrentText"></span>Trang <input type="text" class="text" id="pagecurrent" data-bind='value: CurrentPageIndex, event: { keypress: RunSomethingKey2 }' /> của <span data-bind='text: MaxPageIndex' class="totalpages"></span>
        <a href="javascript:void(0)" data-bind="click: PrevPage, attr: {'class': PrevButtonClass}">Prev </a>
  		<a href="javascript:void(0)" data-bind="click: NextPage, attr: {'class': NextButtonClass}">Next </a>
    </span>
</span>

<table class="tablegrid" cellspacing="0" border="0">
    <thead>
        <tr class="title">        
		    <th>
                <span class="w">Tên tài liệu</span>
            </th>         
		    <th>
                <span class="w">Tên file</span>
            </th>         
		    <th>
                <span class="w">Loại file</span>
            </th>   
		    <th>
                <span class="w">#ID</span>
            </th>   
		    <th>
                <span class="w">Lượt xem</span>
            </th> 
		    <th>
                <span class="w">Lượt download</span>
            </th> 
            <th class="datetime centeralign">
                <span class="w">Ngày tạo</span>
            </th>
		    <th>
                <span class="w">Chia sẻ</span>
            </th> 
            <th class="last active centeralign">
                <span class="w">Kích hoạt</span>
            </th>
        </tr>
    </thead>
    <tbody data-bind="foreach: Products">
        <tr class="line">
		    <td>
                <span class="w" data-bind='text: Title'></span>
            </td>
		    <td>
                <span class="w" data-bind='text: FileName'></span>
            </td>
		    <td>
                <span class="w" data-bind='text: FileType'></span>
            </td>
		    <td class="active">
                <span class="w" data-bind='text: ID'>
                </span>
            </td>
		    <td class="active rightalign">
                <span class="w red" data-bind='text: Reviewed'>
                </span>
            </td>
		    <td class="active rightalign">
                <span class="w red" data-bind='text: Downloaded'>
                </span>
            </td>
		    <td class="datetime centeralign">
                <span class="w" data-bind='text: CreationDate'>
                </span>
            </td>
            <td class="active centeralign">
                <span class="w">
                    <input type="checkbox" name="public" disabled="disabled" data-bind="checked: IsPublic" />
                </span>
            </td>
            <td class="last active centeralign">
                <span class="w">
                    <input type="checkbox" name="active" disabled="disabled" data-bind="checked: Active" />
                </span>
            </td>
	    </tr>
    </tbody>
</table>

<div id="progress" class="loading">Loading...</div>

<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/Client/SearchGrid.js" type="text/javascript"></script>
